/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Actions;

import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;
import java.util.Map;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author Adjell Ian
 */
public class Logout extends ActionSupport {

    public Logout() {
    }

    @Override
    public String execute() throws Exception {
        try {
            Map session = ActionContext.getContext().getSession();
            session.remove("login");
            return SUCCESS;
        } catch (Exception e) {
            Logger.getLogger(Logout.class.getName()).log(Level.SEVERE, null, e);
            return ERROR;
        }
    }
}
